﻿using Core.Infrastructure;
using Infrastructure.Identity.Audit.Endpoints;
using Infrastructure.Identity.Menus.Endpoints;
using Infrastructure.Identity.Organizations.Endpoints;
using Infrastructure.Identity.Roles.Endpoints;
using Infrastructure.Identity.Tenant.Endpoints;
using Infrastructure.Identity.Tokens.Endpoints;
using Infrastructure.Identity.Users.Endpoints;
using Infrastructure.Mvc.Routing;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace Infrastructure.Startups;

public partial class BoilerplateEndpointsStartup : IBoilerplateStartup, IRouteProvider
{
    public virtual void ConfigureServices(IServiceCollection services, IConfiguration configuration)
    {

    }


    public void Configure(IApplicationBuilder application)
    {
    }

    public void RegisterRoutes(IEndpointRouteBuilder endpointRouteBuilder)
    {
        endpointRouteBuilder.MapAuditTrailEndpoints();
        endpointRouteBuilder.MapMenuEndpoints();
        endpointRouteBuilder.MapOrganizationEndpoints();
        endpointRouteBuilder.MapRoleEndpoints();
        endpointRouteBuilder.MapTenantEndpoints();
        endpointRouteBuilder.MapTokenEndpoints();
        endpointRouteBuilder.MapUserEndpoints();
    }

    public int Order => 3000;

    public int Priority => Order;
}
